<?
require_once 'config.php';
$shareId = getValue('shareId');
$share_detail = new Share_Detail($shareId);
$result = $share_detail->result;

$statistics = $share_detail->share_total_statistics($shareId);

//update ip view vao bang
$client_id = get_client_ip();
$db_view_ip = new db_query('SELECT vie_ip,vie_share_id FROM share_view_ip WHERE vie_ip = "'.$client_id.'" AND vie_share_id = '.$shareId);
$view_ip = mysql_num_rows($db_view_ip->result);
if($view_ip == 0) {
    $db_insert_view = new db_execute('INSERT INTO share_view_ip(vie_ip,vie_share_id,vie_link) VALUES("'.$client_id.'",'.$shareId.',"'.$share_detail->url.'")');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="vi" lang="vi" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
	<?=$share_detail->Seo();?>
    <!-- css -->
    <link rel="stylesheet" type="text/css" href="/themes/css/base.css" />
    <link rel="stylesheet" type="text/css" href="/themes/css/detail.css" />	
    <link rel="stylesheet" type="text/css" href="/themes/css/share.css" />	
    <!-- js -->
	<script type="text/javascript" src="/themes/js/jquery-1.9.0.min.js"></script>
	<script type="text/javascript" src="/themes/js/detail_style.js"></script>
	<script type="text/javascript" src="/themes/js/jquery.slimscroll.min.js"></script>
</head>
<body>
<? include '../social_plugins/facebook.php';?>
<script type="text/javascript" src="https://apis.google.com/js/platform.js"></script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<div class="social_wrap">
    <div class="g-plusone" data-size="tall" data-href="<?=$share_detail->url?>"></div>
    <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?=$share_detail->url?>" data-count="vertical">Tweet</a>
    <div class="fb-like" data-href="<?=$share_detail->url?>" data-layout="box_count" data-action="like" data-show-faces="false" data-share="true"></div>
</div>
<style>
    .social_wrap {
        width: 66px;
        position: fixed;
        top: 30%;
        left: 5px;
        z-index: 9999;
    }
    .g-plusone {
        width: 66px;
    }
    .fb-like {
        width: 66px;
        margin-top: 10px;
    }
    .twitter-share-button {
        margin-top: 10px;
    }
</style>
<? include('../view/view_common_loader.php')?>

<div class="wrapper">
    <div class="mg_left">
        
    </div><!-- End mg_left -->
    <? include('../view/view_share_detail.php')?>
    <? include('../view/view_nav.php')?>
</div><!-- End wrapper -->
</body>
</html>